#ifndef FUSE_VM_H
#define FUSE_VM_H

extern "C"
{
    class FuseVMData *initFuseVM(const char *program);
    void *fusevm_init(struct fuse_conn_info *conn);

    void fusevm_destroy(void *data);

    int fusevm_getattr(const char *path, struct stat *stbuf);

    int fusevm_readdir(const char *path, void *buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info *fi);

    int fusevm_statfs(const char *path, struct statvfs *buf);

    int fusevm_open(const char *path, struct fuse_file_info *fi);

    int fusevm_create(const char *path, mode_t mode, struct fuse_file_info *fi);

    int fusevm_mknod(const char *path, mode_t mode, dev_t dev);

    int fusevm_read(const char *path, char *buf, size_t size, off_t offset, struct fuse_file_info *fi);

    int fusevm_write(const char *path, const char *buf, size_t size, off_t offset, struct fuse_file_info *fi);

    int fusevm_release(const char *path, struct fuse_file_info *fi);

    int fusevm_ftruncate(const char *path, off_t offset, struct fuse_file_info *fi);

    int fusevm_truncate(const char *path, off_t offset);

    int fusevm_unlink(const char *path);

    int fusevm_rmdir(const char *path);

    int fusevm_mkdir(const char *path, mode_t mode);

    int fusevm_rename(const char *path, const char *new_path);

    int fusevm_utimens(const char *path, const struct timespec tv[2]);

#if (__APPLE__)
    int fusevm_setxattr(const char *, const char *, const char *, size_t, int, uint32_t);
    int fusevm_getxattr(const char *, const char *, char *, size_t, uint32_t);
#else
    int fusevm_setxattr(const char *, const char *, const char *, size_t, int);
    int fusevm_getxattr(const char *, const char *, char *, size_t);
#endif

    int fusevm_listxattr(const char *, char *, size_t);

    int fusevm_removexattr(const char *, const char *);

    int fusevm_chmod(const char *, mode_t);

    int fusevm_chown(const char *, uid_t, gid_t);

    int fusevm_flush(const char *, struct fuse_file_info *);

    int fusevm_fsync(const char *, int, struct fuse_file_info *);

    int fusevm_fsyncdir(const char *, int, struct fuse_file_info *);

    int fusevm_opendir(const char *, struct fuse_file_info *);

    int fusevm_releasedir(const char *, struct fuse_file_info *);

    int fusevm_access(const char *, int);

    int fusevm_readlink(const char *, char *, size_t);

    int fusevm_symlink(const char *, const char *);
}

#endif